const routers = [
  {
    path: '/login',
    name: '登录',
    component: () => import('../pages/login.vue')
  },
  {
    path: '/',
    name: '我的',
    component: () => import('../shared/index.vue'),
    redirect: '/home',
    children: [
      {
        path: 'home',
        name: '控制面板',
        meta: { title: '控制面板', path: '/home', visible: true, keepalive: false },
        component: resolve => require(['../pages/home.vue'], resolve),
      },
      {
        path: 'helpDocument',
        name: '帮助文档',
        meta: { title: '帮助文档', path: '/helpDocument', visible: false, keepalive: false, icon: 'el-icon-help' },
        component: () => import('../pages/user/helpDocument'),
      },
      {
        path: 'info',
        name: '个人中心',
        meta: { title: '个人中心', path: '/info', visible: false, keepalive: false, icon: 'el-icon-user' },
        component: resolve => require(['../pages/user/info'], resolve),
      },
      {
        path: 'forgetPwd',
        name: '修改密码',
        meta: { title: '修改密码', path: '/forgetPwd', visible: false, keepalive: false, icon: 'el-icon-lock' },
        component: resolve => require(['../pages/user/forgetPwd'], resolve),
      },
      {
        path: 'themeSetting',
        name: '主题设置',
        meta: { title: '主题设置', path: '/themeSetting', visible: false, keepalive: false, icon: 'el-icon-lollipop' },
        component: resolve => require(['../pages/user/themeSetting'], resolve),
      }
    ]
  }
]

export default routers